package com.xbongbong.pro.applist.pojo.vo;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.toolbox.helper.PageHelper;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.pro.enums.SaasMarkEnum;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Map;

/**
 * @author long.rao
 * @version v1.0
 * @date 2019/3/6 21:42
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class SignInStatisticVO extends BaseVO {

    /**
     * 穿透信息，需要封装：businessType、appId、menuId、saasMark
     */
    private JSONObject linkInfo;
    /**
     * 签到统计数据
     * 其中，返回的list为map合集，key包含: userId、userName、signInCount、customerCount
     */
    private List<Map<String, Object>> data;
    /**
     * 分页对象
     */
    private PageHelper pageHelper;

    public SignInStatisticVO(Long appId, Long menuId, List<Map<String, Object>> data, PageHelper pageHelper) {
        linkInfo = new JSONObject();
        linkInfo.put("subBusinessType", XbbRefTypeEnum.SIGNIN.getCode());
        linkInfo.put("appId", appId);
        linkInfo.put("menuId", menuId);
        linkInfo.put("saasMark", SaasMarkEnum.SAAS.getCode());
        this.data = data;
        this.pageHelper = pageHelper;
    }
}
